\begin{tikzpicture}

	\begin{timelinediagram}

		\renewcommand{\timestepvector}{0,-0.4}

		% initial timelines

		\node[minimum width=15ex, font=\normalsize]                                           (clientlabel) {Client};
		\node[minimum width=30ex, font=\normalsize, right of=clientlabel, node distance=30ex] (corelabel)   {Core};
		\node[minimum width=15ex, font=\normalsize, right of=corelabel,   node distance=30ex] (serverlabel) {Server};

		\path (clientlabel)+(-3ex,-3ex) node (timelineanchor) {};
		\newtimeline{client}

		\path (corelabel)+(-10ex,-3ex) node (timelineanchor) {};
		\newtimeline{corerm}
		\path (corerm) node {PD};

		\path (corelabel)+(10ex,-3ex) node (timelineanchor) {};
		\newtimeline{corepd}
		\path (corepd) node {PD};

		\path (serverlabel)+(3ex,-3ex) node (timelineanchor) {};
		\newtimeline{server}

		\activate{server}
		\timestep

		% allocate dataspace

		\transition{server}{corepd}{allocate dataspace}
		\renewcommand{\timestepvector}{0,-0.3}
		\timestep
		\node[dataspace, below=1.3 of corelabel] (physdataspace) {Data \\space};
		\draw[timelinemessage, dashed, above] (corepd) -- node {$create$} (physdataspace);
		\timestep
		\transition{corepd}{server}{}
		\node[align=center] at (transitionlabel) {return \\ capability \textbf{$cap_{ds}$}};
		\renewcommand{\timestepvector}{0,-1.4}
		\timestep

		% server attaches dataspace

		\transition{server}{corerm}{}
		\node[align=center] at (transitionlabel) {attach \\ dataspace \textbf{$cap_{ds}$}};
		\renewcommand{\timestepvector}{0,-0.8}
		\timestep
		\path (server)+(-1,0) node[dataspace, dotted] (serverdataspace) {Data \\space};
		\path[dataspacemapped] (serverdataspace.north east) -- (physdataspace.north east);
		\path[dataspacemapped] (serverdataspace.south west) -- (physdataspace.south west);
		\timestep
		\transition{corerm}{server}{return server-local address}
		\renewcommand{\timestepvector}{0,-0.6}
		\timestep

		% server delegates dataspace to client

		\draw[timelinemessage, dashed] (server) -- node[above] {$delegate$ \textbf{$cap_{ds}$}} (client);
		\activate{client}
		\renewcommand{\timestepvector}{0,-0.4}
		\timestep

		% client attaches dataspace

		\transition{client}{corerm}{}
		\node[align=center] at (transitionlabel) {attach \\ dataspace \textbf{$cap_{ds}$}};
		\renewcommand{\timestepvector}{0,-0.8}
		\timestep
		\path (client)+(1,0) node[dataspace, dotted] (clientdataspace) {Data \\space};
		\path[dataspacemapped] (clientdataspace.north west) -- (physdataspace.north west);
		\path[dataspacemapped] (clientdataspace.south east) -- (physdataspace.south east);
		\timestep
		\transition{corerm}{client}{}
		\path (transitionlabel)+(4ex,0) node[align=center] {return \\ client-local address};

		% server access

		\draw[timelinemessage, dashed, below] (server) .. controls +(-1,0) and +(0,-1) ..
			node {$access$} (serverdataspace);

		\renewcommand{\timestepvector}{0,-1.2}
		\timestep

		% client access

		\draw[timelinemessage, dashed, below] (client) .. controls +(1,0) and +(0,-1) ..
			node {$access$} (clientdataspace);
		\renewcommand{\timestepvector}{0,-0.4}
		\timestep

	\end{timelinediagram}

	\begin{scope}[on background layer]
	\node[timelinegroup, fit=(clientlabel) (clientdataspace) (client)] {};
	\node[timelinegroup, fit=(corelabel)   (corerm) (corepd)] {};
	\node[timelinegroup, fit=(serverlabel) (serverdataspace) (server)] {};
	\end{scope}

\end{tikzpicture}
